//
//  RYCHTTPViewController.h
//  RaiyiCommon
//
//  Created by zhiwei ma on 12-4-25.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RYCHTTPRequestModel.h"
#import "RYCHTTPImageQueue.h"


//#define _EW_HTTP_REQUEST_MODEL_ 

@interface UIViewController (RYCHTTP)

#ifdef _EW_HTTP_REQUEST_MODEL_
@property (nonatomic, retain) RYCHTTPRequestModel* httpModel;
#endif
@property (nonatomic, retain) RYCHTTPImageQueue* httpImageQueue;

#ifdef _EW_HTTP_REQUEST_MODEL_
//-------子类重载-------
- (RYCHTTPRequestModel*)httpRequestModel;//default return nil.
#endif
- (void)makeComponentViewsEnabled:(BOOL)aEnabled;
- (void)startWaiting;
- (void)stopWaiting;
@end


enum
{
    RYCHTTPModelRequestDataPolicyNone = 0,
    RYCHTTPModelRequestDataPolicyViewDidLoad = 0x1,
    RYCHTTPModelRequestDataPolicyViewWillAppear = 0x2,
    RYCHTTPModelRequestDataPolicyViewDidAppear = 0x4
};
typedef NSInteger RYCHTTPModelRequestDataPolicy;

//
//RYCHTTPViewController
//http服务的基类
//
@interface RYCHTTPViewController : UIViewController<RYCHTTPRequestModelDelegate>

@property (nonatomic) RYCHTTPModelRequestDataPolicy httpModelRequestDataPolicy;

@end

